<script>

	$().ready(function() {
		// validate the comment form when it is submitted
		
		
		// validate signup form on keyup and submit
		$("#insertAnnoAccademico").validate({
			rules: {
				date: {
					required: true,
					date: true
					},
				date1: {
						required: true,
						date: true
						},
				date2: {
						required: true,
						date: true
						},
				date3: {
						required: true,
						date: true
						}		
			},
			messages: {
				date1: {
					required: "inserisci la data",
					date: "il formato non e' corretto"
				},
				date: {
					required: "inserisci la data",
					date: "il formato non e' corretto"
				},
				date2: {
					required: "inserisci la data",
					date: "il formato non e' corretto"
				},
				date3: {
					required: "inserisci la data",
					date: "il formato non e' corretto"
				}
			}
		});
	});	
	$(function()
			{
				$('.date-pick').datePicker({startDate:'01/01/1996'});
			});
</script>

<div id="page">
<div id="content">

<form method="get" id="updateAnnoAccademico"
	action="<?php echo BASE_PATH;?>AnnoAccademico/Update_AnnoAccademico/?>">
<fieldset >
			<legend>Modifica i dati relativi all'anno accademico</legend>

<input type="hidden" name="id" value="<?php echo $_GET[id]; ?>">

	<ol>
	<li><label for="date1">Data inizio formale:</label>
	<input type="text" title="date" name="date" id="sel" size="10" class="date-pick" value="<?php echo $vars[AnnoAccademico][0]['Data inizio formale'];?>">
	</li>
	<li><label for="date1">Data fine formale:</label>
	<input type="text" title="date" name="date1" id="sel1" size="10" class="date-pick" value="<?php echo $vars[AnnoAccademico][0]['Data fine formale'];?>">
	</li>
	<li><label for="date1">Data inizio effettiva:</label>
	<input type="text" title="date" name="date2" id="sel2" size="10" class="date-pick" value="<?php echo $vars[AnnoAccademico][0]['Data inizio effettiva'];?>">
	</li>
	<li><label for="date1">Data fine effettiva:</label>
	<input type="text" title="date" name="date3" id="sel3" size="10" class="date-pick" value="<?php echo $vars[AnnoAccademico][0]['Data fine effettiva'];?>">
	</li>
</ol>
<br>
<br>
<input class="button" type="submit" value="Modifica i dati" /> 

	</fieldset>
</form>
</div>
</div>

<?php
if ($vars==1) {?>
<?echo 'Modifica avvenuta con successo';}?>